#ifndef VLC_PLAYER_H
#define VLC_PLAYER_H
#include <QWidget>
#include <QSplitter>
class VodListWgt;
class VlcAudio;
class VlcMedia;
class VlcInstance;
class VlcMediaPlayer;
class VlcWidgetVideo;

class VLC_Player : public QWidget
{
    Q_OBJECT
public:
    explicit VLC_Player(QWidget *parent = nullptr);
    ~VLC_Player();
    void OpenUrl(const QString url);
signals:
    void MediaInfo(const QVariantMap& data);
    void TimeChanged(int time);
public slots:
    void onParsedChanged(bool status);
    void onBuffering(float newCache);
    void HandleControlSignal(const QVariant& data);
protected:

private:
    QString curUrl;
    VodListWgt* _voidlistWgt = nullptr;
    VlcMedia* _media = nullptr;
    VlcAudio* _audio = nullptr;
    QSplitter* _spliter = nullptr;
    VlcInstance* _vlcInstance = nullptr;
    VlcMediaPlayer* _player = nullptr;
    VlcWidgetVideo* _video = nullptr;
    bool isSeeking = false;
};

#endif // VLC_PLAYER_H
